﻿<?php require_once('Connections/dis01.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_dis01, $dis01);
$query_ls_versiculo = "SELECT verso_id, verso_descricao FROM versiculos ORDER BY verso_id DESC";
$ls_versiculo = mysql_query($query_ls_versiculo, $dis01) or die(mysql_error());
$row_ls_versiculo = mysql_fetch_assoc($ls_versiculo);
$totalRows_ls_versiculo = mysql_num_rows($ls_versiculo);

mysql_select_db($database_dis01, $dis01);
$query_ls_devocional = "SELECT dev_id, dev_data, dev_titulo, dev_resumo FROM devocional ORDER BY dev_data DESC";
$ls_devocional = mysql_query($query_ls_devocional, $dis01) or die(mysql_error());
$row_ls_devocional = mysql_fetch_assoc($ls_devocional);
$totalRows_ls_devocional = mysql_num_rows($ls_devocional);
?>

<!DOCTYPE HTML5>
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br" xml:lang="pt-br">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Disseminando.com</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="css/orman.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />	

<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js">

</script>


<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "templatemo_menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>

<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" /> 
<script type="text/JavaScript" src="js/slimbox2.js"></script> 

</head>
<body id="subpage">

<div id="templatemo_wrapper">
	<div id="templatemo_header">
    	<div id="site_title"><img src="images/logo_projeto.png" width="296" height="76" /></div>
        <div id="templatemo_menu" class="ddsmoothmenu">
            <ul>
                <li><a href="index.php">Inicio</a></li>
                <li><a href="#" class="selected">Publicacao</a></li>                
            </ul>
            <br style="clear: left" />
        </div> <!-- end of templatemo_menu -->
    </div> <!-- END of header -->
    
    <div id="templatemo_page_intro">
    	<h1>Versiculo do Dia</h1>
        <p><?php echo $row_ls_versiculo['verso_descricao']; ?></p>
    </div>
    
    
    <div id="templatemo_main">
    <div class="clear">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="214" colspan="3"><img src="images/blog/evangelismo02.jpg" width="616" height="200"></td>
        </tr>
        <tr>
          <td width="16%" height="23" bgcolor="#CCCCCC"><strong>Data</strong></td>
          <td width="31%" bgcolor="#CCCCCC"><strong>Titulo</strong></td>
          <td width="53%" bgcolor="#CCCCCC"><strong>Resumo</strong></td>
        </tr>
        <?php do { ?>
        <tr>
          
            <td><?php echo $row_ls_devocional['dev_data']; ?></td>
            <td><a href="cs_msg1001.php?dev_id=<?php echo $row_ls_devocional['dev_id']; ?>"><?php echo $row_ls_devocional['dev_titulo']; ?></a></td>
            <td><?php echo $row_ls_devocional['dev_resumo']; ?></td>
            
        </tr>
        <?php } while ($row_ls_devocional = mysql_fetch_assoc($ls_devocional)); ?>
      </table>
</div>       
        </div> <!-- END of content -->
        <div class="clear"></div>                
    </div> <!-- END of main -->
</div> <!-- END of wrapper -->

<div id="templatemo_bottom_wrapper">
	<div id="templatemo_bottom">
    	
        <div class="col col_3">
          <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="No" width="100%" height="30" style= "position: fixed; top: 0%; left: 0%;height: 6%;width: 100%;" src="http://streaming15.hstbr.net/player/radiogospeladoradores"></iframe>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div> <!-- END of bottom -->
    
</div> <!-- END of bottom wrapper -->

<div id="templatemo_footer_wrapper">
	<div id="templatemo_footer">
    	 <?php include('rodape.php') ?>
    </div> <!-- END of footer -->
</div> <!-- END of footer wrapper -->

</body>
</html>
<?php
mysql_free_result($ls_versiculo);

mysql_free_result($ls_devocional);
?>
